<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    
    <title><?php echo $pagevals['page_title']?></title>
    <meta name="author" content="SuggeElson" />
    <meta name="description" content="Supr admin template - new premium responsive admin template. This template is designed to help you build the site administration without losing valuable time.Template contains all the important functions which must have one backend system.Build on great twitter boostrap framework" />
    <meta name="keywords" content="admin, admin template, admin theme, responsive, responsive admin, responsive admin template, responsive theme, themeforest, 960 grid system, grid, grid theme, liquid, masonry, jquery, administration, administration template, administration theme, mobile, touch , responsive layout, boostrap, twitter boostrap" />
    <meta name="application-name" content="Supr admin template" />

    <!-- Mobile Specific Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <!-- Le styles -->
    <link href="<?php echo Yii::app()->baseUrl ?>/supr/css/bootstrap/bootstrap.css" rel="stylesheet" />
    <link href="<?php echo Yii::app()->baseUrl ?>/supr/css/bootstrap/bootstrap-responsive.css" rel="stylesheet" />
    <link href="<?php echo Yii::app()->baseUrl ?>/supr/css/supr-theme/jquery.ui.supr.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo Yii::app()->baseUrl ?>/supr/css/icons.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo Yii::app()->baseUrl ?>/supr/plugins/uniform/uniform.default.css" type="text/css" rel="stylesheet" />

    <!-- Main stylesheets -->
    <link href="<?php echo Yii::app()->baseUrl ?>/supr/css/main.css" rel="stylesheet" type="text/css" /> 

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!--[if lt IE 9]>
        <link type="text/css" href="css/ie.css" rel="stylesheet" />
    <![endif]-->

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="images/favicon.ico" />
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo Yii::app()->baseUrl ?>/supr/images/apple-touch-icon-144-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo Yii::app()->baseUrl ?>/supr/images/apple-touch-icon-114-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo Yii::app()->baseUrl ?>/supr/images/apple-touch-icon-72-precomposed.png" />
    <link rel="apple-touch-icon-precomposed" href="<?php echo Yii::app()->baseUrl ?>/supr/images/apple-touch-icon-57-precomposed.png" />

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
      
    <body class="loginPage">

    <div class="container-fluid">

        <div id="header">

            <div class="row-fluid">

                <div class="navbar">
                    <div class="navbar-inner">
                      <div class="container">
                            <a class="brand" href="dashboard.html"><?php echo $pagevals['page_title'];?><span class="slogan"><?php echo $pagevals['subpage_title']?></span></a>
                      </div>
                    </div><!-- /navbar-inner -->
                  </div><!-- /navbar -->
                

            </div><!-- End .row-fluid -->

        </div><!-- End #header -->

    </div><!-- End .container-fluid -->    

    <div class="container-fluid">

        <div class="loginContainer">
            <form class="form-horizontal" action="?r=site/login" id="loginForm" method="POST"/>
                <div class="form-row row-fluid">
                    <div class="span12">
                        <div class="row-fluid">
                            <label class="form-label span12" for="username">
                                Username:
                                <span class="icon16 icomoon-icon-user-2 right gray marginR10"></span>
                            </label>
                            <input class="span12" id="username" type="text" name="username" value="<?php echo $pagevals['username'];?>" />
                        </div>
                    </div>
                </div>

                <div class="form-row row-fluid">
                    <div class="span12">
                        <div class="row-fluid">
                            <label class="form-label span12" for="">
                                Password:
                                <span class="icon16 icomoon-icon-locked right gray marginR10"></span>
                                <!--span class="forgot"><a href="#">Forgot your password?</a></span-->
                            </label>
                            <input class="span12" id="password" type="password" name="password" value="" />
                        </div>
                    </div>
                </div>
                <div class="form-row row-fluid">                       
                    <div class="span12">
                        <div class="row-fluid">
                            <div class="form-actions">
                            <div class="span12 controls">
                                <input type="checkbox" id="keepLoged" value="Value" class="styled" name="logged" /> Keep me logged in
                                <button type="submit" class="btn btn-info right" id="loginBtn"><span class="icon16 icomoon-icon-enter white"></span> Login</button>
                            </div>
                            </div>
                        </div>
                    </div> 
                </div>

            </form>
        </div>

    </div><!-- End .container-fluid -->

    <!-- Le javascript
    ================================================== -->
    <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/jquery/jquery-ui.min.js"></script>
    <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/supr/js/bootstrap/bootstrap.js"></script>  
    <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/supr/plugins/touch-punch/jquery.ui.touch-punch.min.js"></script>
    <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/supr/plugins/ios-fix/ios-orientationchange-fix.js"></script>
    <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/supr/plugins/validate/jquery.validate.min.js"></script>
    <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/supr/plugins/uniform/jquery.uniform.min.js"></script>
    <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/jquery/jquery.md5.js"></script>
    <script type="text/javascript">
        
        $(document).ready(function(){
            $("#loginBtn").click(function(){   
               pass =  $.md5($("#password").val());
               $("#password").val(pass);
            }); 
            
            $('#username').keyup(function(e){
                if(e.keyCode == 13){
                  pass =  $.md5($("#password").val());
                  $("#password").val(pass);
                }
            });
            $('#password').keyup(function(e){
                if(e.keyCode == 13){
                  pass =  $.md5($("#password").val());
                  $("#password").val(pass);
                }
            });
        });
        var error = '<?php echo $pagevals['error'];?>';
        if(error == '1'){
            alert('Tên đăng nhập không đúng! Xin thử lại.');
        }
        
        if(error == '2'){
            alert('Mật khẩu không đúng! Xin thử lại.');
        }
        
        
        
    </script>
    </body>
</html>